Optimal. Leaf size=85 \[ -\frac {B g (a+b x)^2}{4 (b c-a d) i^3 (c+d x)^2}+\frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{2 (b c-a d) i^3 (c+d x)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {2562, 2341}
\begin {gather*} \frac {g (a+b x)^2 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{2 i^3 (c+d x)^2 (b c-a d)}-\frac {B g (a+b x)^2}{4 i^3 (c+d x)^2 (b c-a d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2341
Rule 2562
Rubi steps
\begin {align*} \int \frac {(a g+b g x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{(49 c+49 d x)^3} \, dx &=\int \left (\frac {(-b c+a d) g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{117649 d (c+d x)^3}+\frac {b g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{117649 d (c+d x)^2}\right ) \, dx\\ &=\frac {(b g) \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(c+d x)^2} \, dx}{117649 d}-\frac {((b c-a d) g) \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{(c+d x)^3} \, dx}{117649 d}\\ &=\frac {(b c-a d) g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{235298 d^2 (c+d x)^2}-\frac {b g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{117649 d^2 (c+d x)}+\frac {(b B g) \int \frac {b c-a d}{(a+b x) (c+d x)^2} \, dx}{117649 d^2}-\frac {(B (b c-a d) g) \int \frac {b c-a d}{(a+b x) (c+d x)^3} \, dx}{235298 d^2}\\ &=\frac {(b c-a d) g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{235298 d^2 (c+d x)^2}-\frac {b g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{117649 d^2 (c+d x)}+\frac {(b B (b c-a d) g) \int \frac {1}{(a+b x) (c+d x)^2} \, dx}{117649 d^2}-\frac {\left (B (b c-a d)^2 g\right ) \int \frac {1}{(a+b x) (c+d x)^3} \, dx}{235298 d^2}\\ &=\frac {(b c-a d) g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{235298 d^2 (c+d x)^2}-\frac {b g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{117649 d^2 (c+d x)}+\frac {(b B (b c-a d) g) \int \left (\frac {b^2}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^2}-\frac {b d}{(b c-a d)^2 (c+d x)}\right ) \, dx}{117649 d^2}-\frac {\left (B (b c-a d)^2 g\right ) \int \left (\frac {b^3}{(b c-a d)^3 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^3}-\frac {b d}{(b c-a d)^2 (c+d x)^2}-\frac {b^2 d}{(b c-a d)^3 (c+d x)}\right ) \, dx}{235298 d^2}\\ &=-\frac {B (b c-a d) g}{470596 d^2 (c+d x)^2}+\frac {b B g}{235298 d^2 (c+d x)}+\frac {b^2 B g \log (a+b x)}{235298 d^2 (b c-a d)}+\frac {(b c-a d) g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{235298 d^2 (c+d x)^2}-\frac {b g \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{117649 d^2 (c+d x)}-\frac {b^2 B g \log (c+d x)}{235298 d^2 (b c-a d)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(207\) vs. \(2(85)=170\).
time = 0.11, size = 207, normalized size = 2.44 \begin {gather*} \frac {g \left (\frac {(b c-a d) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{2 d^2 (c+d x)^2}-\frac {b \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{d^2 (c+d x)}+\frac {b B \left (\frac {1}{c+d x}+\frac {b \log (a+b x)}{b c-a d}-\frac {b \log (c+d x)}{b c-a d}\right )}{d^2}-\frac {B \left (\frac {b c-a d}{(c+d x)^2}+\frac {2 b}{c+d x}+\frac {2 b^2 \log (a+b x)}{b c-a d}-\frac {2 b^2 \log (c+d x)}{b c-a d}\right )}{4 d^2}\right )}{i^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(180\) vs.
\(2(81)=162\).
time = 0.51, size = 181, normalized size = 2.13
method | result | size |
norman | \(\frac {-\frac {2 A a d g +2 A b c g -B a d g -B b c g}{4 i \,d^{2}}-\frac {\left (2 A b g -B b g \right ) x}{2 i d}-\frac {B \,a^{2} g \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{2 i \left (a d -c b \right )}-\frac {B \,b^{2} g \,x^{2} \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{2 \left (a d -c b \right ) i}-\frac {B a b g x \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{i \left (a d -c b \right )}}{i^{2} \left (d x +c \right )^{2}}\) | \(174\) |
derivativedivides | \(-\frac {e \left (a d -c b \right ) \left (\frac {g \,d^{2} A \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2}}{2 \left (a d -c b \right )^{2} e^{3} i^{3}}+\frac {g \,d^{2} B \left (\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{2}-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2}}{4}\right )}{\left (a d -c b \right )^{2} e^{3} i^{3}}\right )}{d^{2}}\) | \(181\) |
default | \(-\frac {e \left (a d -c b \right ) \left (\frac {g \,d^{2} A \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2}}{2 \left (a d -c b \right )^{2} e^{3} i^{3}}+\frac {g \,d^{2} B \left (\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{2}-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2}}{4}\right )}{\left (a d -c b \right )^{2} e^{3} i^{3}}\right )}{d^{2}}\) | \(181\) |
risch | \(-\frac {B g \left (2 b d x +a d +c b \right ) \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{2 d^{2} i^{3} \left (d x +c \right )^{2}}-\frac {g \left (2 B \ln \left (b x +a \right ) b^{2} d^{2} x^{2}-2 B \ln \left (-d x -c \right ) b^{2} d^{2} x^{2}+4 B \ln \left (b x +a \right ) b^{2} c d x -4 B \ln \left (-d x -c \right ) b^{2} c d x +4 A a b \,d^{2} x -4 A \,b^{2} c d x +2 B \ln \left (b x +a \right ) b^{2} c^{2}-2 B \ln \left (-d x -c \right ) b^{2} c^{2}-2 B a b \,d^{2} x +2 B \,b^{2} c d x +2 A \,a^{2} d^{2}-2 A \,b^{2} c^{2}-B \,a^{2} d^{2}+B \,b^{2} c^{2}\right )}{4 d^{2} i^{3} \left (d x +c \right )^{2} \left (a d -c b \right )}\) | \(249\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 522 vs. \(2 (76) = 152\).
time = 0.29, size = 522, normalized size = 6.14 \begin {gather*} -{\left (\frac {b^{2} \log \left (b x + a\right )}{2 i \, b^{2} c^{2} d - 4 i \, a b c d^{2} + 2 i \, a^{2} d^{3}} - \frac {b^{2} \log \left (d x + c\right )}{2 i \, b^{2} c^{2} d - 4 i \, a b c d^{2} + 2 i \, a^{2} d^{3}} - \frac {2 \, b d x + 3 \, b c - a d}{-4 i \, b c^{3} d + 4 i \, a c^{2} d^{2} - 4 \, {\left (i \, b c d^{3} - i \, a d^{4}\right )} x^{2} - 8 \, {\left (i \, b c^{2} d^{2} - i \, a c d^{3}\right )} x} - \frac {\log \left (\frac {b x e}{d x + c} + \frac {a e}{d x + c}\right )}{2 i \, d^{3} x^{2} + 4 i \, c d^{2} x + 2 i \, c^{2} d}\right )} B a g - B b g {\left (\frac {{\left (b^{2} c - 2 \, a b d\right )} \log \left (b x + a\right )}{2 i \, b^{2} c^{2} d^{2} - 4 i \, a b c d^{3} + 2 i \, a^{2} d^{4}} - \frac {{\left (b^{2} c - 2 \, a b d\right )} \log \left (d x + c\right )}{2 i \, b^{2} c^{2} d^{2} - 4 i \, a b c d^{3} + 2 i \, a^{2} d^{4}} - \frac {{\left (2 \, d x + c\right )} \log \left (\frac {b x e}{d x + c} + \frac {a e}{d x + c}\right )}{2 i \, d^{4} x^{2} + 4 i \, c d^{3} x + 2 i \, c^{2} d^{2}} - \frac {b c^{2} - 3 \, a c d + 2 \, {\left (b c d - 2 \, a d^{2}\right )} x}{-4 i \, b c^{3} d^{2} + 4 i \, a c^{2} d^{3} - 4 \, {\left (i \, b c d^{4} - i \, a d^{5}\right )} x^{2} - 8 \, {\left (i \, b c^{2} d^{3} - i \, a c d^{4}\right )} x}\right )} + \frac {{\left (2 \, d x + c\right )} A b g}{2 i \, d^{4} x^{2} + 4 i \, c d^{3} x + 2 i \, c^{2} d^{2}} + \frac {A a g}{2 i \, d^{3} x^{2} + 4 i \, c d^{2} x + 2 i \, c^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 174 vs. \(2 (76) = 152\).
time = 0.39, size = 174, normalized size = 2.05 \begin {gather*} \frac {2 \, {\left ({\left (-2 i \, A + i \, B\right )} b^{2} c d + {\left (2 i \, A - i \, B\right )} a b d^{2}\right )} g x - {\left ({\left (2 i \, A - i \, B\right )} b^{2} c^{2} + {\left (-2 i \, A + i \, B\right )} a^{2} d^{2}\right )} g + 2 \, {\left (i \, B b^{2} d^{2} g x^{2} + 2 i \, B a b d^{2} g x + i \, B a^{2} d^{2} g\right )} \log \left (\frac {{\left (b x + a\right )} e}{d x + c}\right )}{4 \, {\left (b c^{3} d^{2} - a c^{2} d^{3} + {\left (b c d^{4} - a d^{5}\right )} x^{2} + 2 \, {\left (b c^{2} d^{3} - a c d^{4}\right )} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 382 vs.
\(2 (71) = 142\).
time = 3.23, size = 382, normalized size = 4.49 \begin {gather*} \frac {B b^{2} g \log {\left (x + \frac {- \frac {B a^{2} b^{2} d^{2} g}{a d - b c} + \frac {2 B a b^{3} c d g}{a d - b c} + B a b^{2} d g - \frac {B b^{4} c^{2} g}{a d - b c} + B b^{3} c g}{2 B b^{3} d g} \right )}}{2 d^{2} i^{3} \left (a d - b c\right )} - \frac {B b^{2} g \log {\left (x + \frac {\frac {B a^{2} b^{2} d^{2} g}{a d - b c} - \frac {2 B a b^{3} c d g}{a d - b c} + B a b^{2} d g + \frac {B b^{4} c^{2} g}{a d - b c} + B b^{3} c g}{2 B b^{3} d g} \right )}}{2 d^{2} i^{3} \left (a d - b c\right )} + \frac {- 2 A a d g - 2 A b c g + B a d g + B b c g + x \left (- 4 A b d g + 2 B b d g\right )}{4 c^{2} d^{2} i^{3} + 8 c d^{3} i^{3} x + 4 d^{4} i^{3} x^{2}} + \frac {\left (- B a d g - B b c g - 2 B b d g x\right ) \log {\left (\frac {e \left (a + b x\right )}{c + d x} \right )}}{2 c^{2} d^{2} i^{3} + 4 c d^{3} i^{3} x + 2 d^{4} i^{3} x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.55, size = 149, normalized size = 1.75 \begin {gather*} \frac {1}{4} \, {\left (\frac {2 i \, {\left (b x e + a e\right )}^{2} B g \log \left (\frac {b x e + a e}{d x + c}\right )}{{\left (d x + c\right )}^{2}} + \frac {2 i \, {\left (b x e + a e\right )}^{2} A g}{{\left (d x + c\right )}^{2}} - \frac {i \, {\left (b x e + a e\right )}^{2} B g}{{\left (d x + c\right )}^{2}}\right )} {\left (\frac {b c}{{\left (b c e - a d e\right )} {\left (b c - a d\right )}} - \frac {a d}{{\left (b c e - a d e\right )} {\left (b c - a d\right )}}\right )} e^{\left (-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.63, size = 198, normalized size = 2.33 \begin {gather*} -\frac {x\,\left (2\,A\,b\,d\,g-B\,b\,d\,g\right )+A\,a\,d\,g+A\,b\,c\,g-\frac {B\,a\,d\,g}{2}-\frac {B\,b\,c\,g}{2}}{2\,c^2\,d^2\,i^3+4\,c\,d^3\,i^3\,x+2\,d^4\,i^3\,x^2}-\frac {\ln \left (\frac {e\,\left (a+b\,x\right )}{c+d\,x}\right )\,\left (\frac {B\,a\,g}{2\,d^2\,i^3}+\frac {B\,b\,c\,g}{2\,d^3\,i^3}+\frac {B\,b\,g\,x}{d^2\,i^3}\right )}{2\,c\,x+d\,x^2+\frac {c^2}{d}}+\frac {B\,b^2\,g\,\mathrm {atan}\left (\frac {b\,c\,2{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{d^2\,i^3\,\left (a\,d-b\,c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________